import request from '@/utils/request'
import { genParam } from '@/utils/encrypt'

export function getList(params) {
  genParam(params)

  return request({
    url: '/admin/order/list',
    method: 'get',
    params
  })
}

export function editOrder(param) {
  const params = {
    sn: param.sn
  }
  const paramStr = genParam(params)

  return request({
    url: '/admin/order/' + param.id + '/edit',
    method: 'put',
    data: paramStr
  })
}

export function refundInfo(sn) {
  return request({
    url: '/admin/order/' + sn + '/info',
    method: 'get',
  })
  
}